#ifndef __SYS_CMD_H__
#define __SYS_CMD_H__

#include "common.h"

typedef unsigned int (*cmd_handler)(int, int);

typedef struct {
    unsigned long long value1;
    unsigned long long value2;
    cmd_handler pFunc;
} cmd_desc_t;

union semun
{
	int val;
};

typedef struct {
    void* (*thread_func)(void*);  // 线程函数指针
    void* arg;                    // 线程参数
    const char* name;             // 线程名称
} thread_attr_t;

typedef struct
{
    shm_buf_data_t *shm_ptr;
    int sem_id;
    atomic_bool running;
} pthread_para_t;

#define cmd_process_func(_name_) unsigned int _name_(int param, int value) // 方便定义命令处理函数的函数名
// 命令处理函数声明
cmd_process_func(process_test1);
cmd_process_func(process_test2);
cmd_process_func(process_smart_test1);
cmd_process_func(process_exit);

#endif /* __SYS_CMD_H__ */
